-- GENERATED SPELL FOR [Warp Monstrosity] --


function spell0_20516(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(13901,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20516', 2500, 1)
end

function spell1_20516(pUnit, Event) --@Warp Storm,n/a--
pUnit:FullCastSpellOnTarget(36577,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20516', 22000, 1)
end

function Sorts_20516(pUnit, Event)
local choix_sorts_20516 = math.random(0, 1)
if choix_sorts_20516 == 0 then
pUnit:RegisterEvent('spell0_20516', 1, 1)
end
if choix_sorts_20516 == 1 then
pUnit:RegisterEvent('spell1_20516', 1, 1)
end
end

function mob20516_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20516', math.random(1500, 3000), 1)
end

function mob20516_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20516_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20516_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20516, 1, 'mob20516_Action')
RegisterUnitEvent(20516, 2, 'mob20516_Leave')
RegisterUnitEvent(20516, 3, 'mob20516_Kill')
RegisterUnitEvent(20516, 4, 'mob20516_Die')
